<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <p class="item_list"></p>

    <!-- axios: .js-->
    <!-- 省份数据地址：https://hmajax.itheima.net/api/province -->


    <script src="./JS/axios.min.js"></script>
    <script>
        axios({
            url: 'https://hmajax.itheima.net/api/province',
            method: 'GET',
        }).then(result => {
            console.log(result);
            // 获取数组
            console.log(result.data.list);
            // 追加字符串
            console.log(result.data.list.join('<br>'));
            // 插入到省份列表
            document.querySelector('.item_list').innerHTML = result.data.list.join('<br>')
        })
    </script>
</body>

</html>